package com.qianli.cashmama.product.server.controller;

import com.alibaba.fastjson.JSON;
import com.qianli.cashmama.product.facade.ProductFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2018/7/31
 * Time: 下午5:04
 */
@Controller
@RequestMapping(value = "/test")
public class TestController {

    @Autowired
    private ProductFacade productFacade;

    @RequestMapping(value = "/test01")
    @ResponseBody
    public String test01() {
        System.out.println(JSON.toJSONString(productFacade.getProductDetail("cashmama_new_1500_14", false)));
        System.out.println(JSON.toJSONString(productFacade.getAllActiveProductCategory()));
        System.out.println(JSON.toJSONString(productFacade.getProductList("sdzzall", false)));
        System.out.println(JSON.toJSONString(productFacade.getActiveProductList("sdzzall", false)));
        return "cashmama-product, ok";
    }

}
